/** @format */

const express = require("express");
const { verifyToken } = require("../utils/jwt");
const { login, regist, editUser, getUser, delUser } = require("../controller/userController");
const validator = require("../middleware/userValidator");

const user = express.Router();

user.post("/login", validator.login, login);
user.post("/regist", validator.register, regist);
user.post("/editUser", verifyToken, editUser);
user.get("/getUser", verifyToken, getUser);
user.delete("/delUser", verifyToken, delUser);

module.exports = user;
